//
//  FWCBasicTableViewController.swift
//  微博项目001
//
//  Created by 樊武超 on 16/4/8.
//  Copyright © 2016年 樊武超. All rights reserved.
//

import UIKit

class FWCBasicTableViewController: UITableViewController,FWCHomeLoginViewDelegate {

    var isLogin=FWCHomeViewModel.shareHomeViewModel.isLogin
    
    var visterView:FWCHomeLoginView?
    
    
    override func loadView() {
        if isLogin {
            super.loadView()
        } else {
            let v=FWCHomeLoginView()
            
            v.LoginViewDelegate = self
            view=v
            visterView=v
            navigationItem.leftBarButtonItem=UIBarButtonItem(title: "登录", style: .Plain, target: self, action: "dengLuBtnDidClick")
            navigationItem.rightBarButtonItem=UIBarButtonItem(title: "注册", style: .Plain, target: self, action: "zhuceBtnDidClick")
            
         }
     }

    func dengLuBtnDidClick(){
    print("dengLuBtnDidClick")
    
        let vc=FWCOAuthViewController()
        let nav=UINavigationController(rootViewController: vc)
    navigationController?.presentViewController(nav, animated: true, completion: nil)
        
    }
    func zhuceBtnDidClick(){
    print("zhuceBtnDidClick")
    
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        

}
}
